<template>
	<view>
		<view class="template-easy">
			<scroll-view scroll-y="true" :style="'height:'+scrollH+'px;'">
				<view class="" v-for="(item,index) in list.imgUrl" :key="index"
					style="width: 100%; margin-bottom: 30rpx;" :style="'height:'+scrollH+'px;'">
					<image :src="item" @click="previe(index)"></image>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import {
		easyImg
	} from '@/utils/applet/chooseImgPrint.js'
	export default {
		data() {
			return {
				list: {},
				imgUrl: [],
				scrollH: 500,
			}
		},
		onLoad(options) {
			uni.getSystemInfo({
				success: (res) => {
					console.log(res)
					this.scrollH = res.windowHeight;
				}
			});
			console.log(options)
			if (typeof options.list == 'string' && options.list != undefined) {
				this.list = JSON.parse(options.list);
				this.imgUrl = this.list.imgUrl;
				console.log(this.list, 'this.list=')
				console.log(this.imgUrl, 'this.imgUrl')
			}
		},
		methods: {
			previe(index) {
				// 预览图片 还未提交的时候可以删除 提交点击后发送到服务器过程不可以删除 
				easyImg(this.imgUrl, index)
			},
		}
	}
</script>

<style>

</style>
